package net.zjict.lib.creationType.factoryMethod.gardenFactory;

public class Test {
    public static void main(String[] args) {
        System.out.println("典雅型");
        StyleFactory elegantStyle = new ElegantStyle();
        System.out.print("花台种植的是：");
        elegantStyle.plant().flower();
        System.out.print("中心种植的是：");
        elegantStyle.plant().center();
        System.out.print("墙角种植的是：");
        elegantStyle.plant().corner();

        System.out.println("实用型");
        StyleFactory practicalStyle = new PracticalStyle();
        System.out.print("花台种植的是：");
        practicalStyle.plant().flower();
        System.out.print("中心种植的是：");
        practicalStyle.plant().center();
        System.out.print("墙角种植的是：");
        practicalStyle.plant().corner();

        System.out.println("懒人型");
        StyleFactory lazyStyle = new LazyStyle();
        System.out.print("花台种植的是：");
        lazyStyle.plant().flower();
        System.out.print("中心种植的是：");
        lazyStyle.plant().center();
        System.out.print("墙角种植的是：");
        lazyStyle.plant().corner();

    }
}
